package com.youhome.service.service;

import com.github.pagehelper.PageInfo;
import com.youhome.common.exception.CustomException;
import com.youhome.service.model.BCounselor;
import com.youhome.service.model.BCounselorItem;
import com.youhome.service.model.Principal;

import java.util.List;

/**
 * Created by chen365 on 2017/10/23.
 */
public interface BCounselorService {
    int create(Principal principal, String phone, String name, Integer sex, String email, String jobNumber, String weixin, String qq, String businessCard, String responsiblePlace, String photo) throws Exception;

    int update(Long counselorId, String jobNumber, String weixin, String qq, String businessCard, String responsiblePlace, String photo) throws Exception;

    PageInfo<BCounselor> selectByBean(Integer page, Integer pageSize, BCounselor record);

    List<BCounselor> selectByBean(BCounselor record);

    PageInfo<BCounselor> selectTopByCompanyID(Integer pageNumber, Integer pageSize, Long companyId);

    BCounselor selectByPrimaryKey(Long counselorId);

    BCounselor selectByUserId(Long userId);

    BCounselor selectByUUID(String uuid);

    int delete(BCounselor counselor) throws Exception;


    int updateIsTopByPrimaryKey(Long counselorId);

    int updateSortByPrimaryKey(BCounselor record);

    int selectIsTopCountByCompanyId(Long companyId);

    int selectCountByCompanyId(Principal principal) throws CustomException;

    void updateSortByPrimaryKey(String uuid, Integer sort) throws CustomException;

    PageInfo<BCounselor> selectTopByCompanyID(String uuid, Integer pageNumber, Integer pageSize) throws CustomException;

    void top(Long counselorId) throws CustomException;

    void delete(Principal principal,Long counselorId) throws CustomException;

    void update(BCounselor record) throws CustomException;

    BCounselor selectDetails(Principal principal,Long counselorId);

    String export(Principal principal) throws CustomException;

    List<BCounselorItem> select(Principal principal)throws CustomException;

    PageInfo<BCounselor> select(Principal principal,Integer pageNumber, Integer pageSize, String keyword, Boolean istop)throws CustomException;

    BCounselor create(Principal principal, BCounselor map)throws CustomException;
}
